<?php
/*
 * Created on 2008-5-9
 *
 * File:news.php
 * Author:David Meng
 * Site:http://www.systn.com
 * Email:mdchinese@gmail.com
 *
 */


/*
 * 检测提交数据是否符合要求
 */
function post_check($check_info = array()){
	//数组处理方式
	if (trim($check_info['name'])!=''){
		if(trim($check_info[data])==''){
			msg('抱歉，请输入'.$check_info[name]);
			return 1;		//错误返回1
		}
	}else{
		unset($k,$v);
		$i = 0;
		foreach ($check_info AS $v) {
			$i++;
			if(trim($v[data])==''){
				msg('抱歉，请输入'.$v[name]);
				return 1;
			}
		}
	}

}

?>